export function replaceStar (str, left, right){
    let str2 = str;
    try{
      if(str.length>15){//银行账号
        left = null==left?4:left;
        right = null==right?4:right;
      }else{//手机号
        left = null==left?3:left;
        right = null==right?4:right;
      }

      let reg = '/^(.{'+left+'}).+(.{'+right+'})$/';
      let rr = "";
      if(str.length> left+right){
        let ss = str.length-(left+right);
        for(let x=0;x<ss;x++){
          rr+="*"
        }
      }
      str2 = str.replace(eval(reg), "$1 "+rr+" $2");
    }catch (erro){
      str2 = str;
    }
    return str2;
  }

/**
 * table中部分字段中间加***
 * @param row
 * @param column
 * @param cellValue
 * @param index
 * @returns {*}
 */
  export function hidInfo(row, column, cellValue, index){
    if(cellValue){
      return replaceStar(cellValue);
    }
  }

